<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
  <head>
    <meta charset="UTF-8"/>
<meta content="zh-cn" http-equiv="Content-Language"/>
<title>和富商城</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, maximum-scale=1.0, user-scalable=1">
<meta content="application/xhtml+xml; charset=utf-8" http-equiv="Content-Type"/>

<link rel="stylesheet" href="/Public/Tool/mzui/css/mzui.min.css">
<link rel="stylesheet" href="/Public/Tool/Swiper/swiper-3.4.2.min.css">


<script src="/Public/Tool/mzui/js/mzui.min.js"></script>
<script src="/Public/Tool/Swiper/swiper-3.4.2.jquery.min.js"></script>
<script src="/Public/Js/timecount.js"></script>
<script src="/Public/Js/textSlider.js"></script>


  </head>
  <body>
    <!-- 头部 -->
    


    <!-- /头部 -->
    <!-- 主体 -->
    
 
<style>
.swiper-container {
  width: 100%;
  height: 100%;
}
.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;

  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
}

#gongao #scroll_begin, #gongao #scroll_end{display:inline} 
</style>

<script type="text/javascript"> 
function ScrollImgLeft(){ 
  var speed=50; 
  var scroll_begin = document.getElementById("scroll_begin"); 
  var scroll_end = document.getElementById("scroll_end"); 
  var scroll_div = document.getElementById("scroll_div"); 
  scroll_end.innerHTML=scroll_begin.innerHTML; 
  function Marquee(){ 
    if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0) 
      scroll_div.scrollLeft-=scroll_begin.offsetWidth; 
    else 
      scroll_div.scrollLeft++; 
  } 
  var MyMar=setInterval(Marquee,speed); 
  scroll_div.onmouseover=function() {clearInterval(MyMar);} 
  scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed);} 
} 
</script> 
<div id="gongao" style="width:100%;height:30px;overflow:hidden;line-height:30px;" class="white"> 
  <div style="width:100%;height:30px;margin:0 auto;white-space: nowrap;overflow:hidden;" id="scroll_div" class="scroll_div"> 
    <div id="scroll_begin"> 
    <?php if(is_array($order_list)): foreach($order_list as $key=>$order): ?><span style="margin-right:30px;" class="text-red">恭喜<?php echo ($order["nickname"]); ?> 赢得 <?php echo ($order["num"]); ?> 张<?php echo ($order["card_name"]); ?></span><?php endforeach; endif; ?>
    </div> 
    <div id="scroll_end"></div> 
  </div> 
  <script type="text/javascript">ScrollImgLeft();</script> 
</div> 
<div class="swiper-container">
  <div class="swiper-wrapper">
    <div class="swiper-slide"><a href="#" target="_blank"><img style="margin:0px;" src="/Public/Img/banner.png"/></a></div>
    <div class="swiper-slide"><a href="#" target="_blank"><img style="margin:0px;" src="/Public/Img/banner.png"/></a></div>
    <div class="swiper-slide"><a href="#" target="_blank"><img style="margin:0px;" src="/Public/Img/banner.png"/></a></div>
</div>
<script type="text/javascript">
$(function(){
  var swiper = new Swiper('.swiper-container', {
    autoplay: 5000,
  });
})
</script>
<div class="box section">
  <div class="text-center text-gray">第 <span class="text-important"><?php echo ($issue); ?></span> 期</div> 
</div>
<div class="section box">
  <div style="overflow:hidden;">
    <div>
      <i class="icon icon-bell-alt text-red"></i>
      <div class="inline text-gray">距本次开奖还有：</div>
      <div class="inline fnTimeCountDown text-red" data-end="<?php echo ($end_time); ?>">
        <span class="mini">00</span>分
        <span class="sec">00</span>秒
        <span class="hm">000</span>
      </div>
    </div>
    <hr/>
    <div class="row">
      <?php if(is_array($card_list_1)): foreach($card_list_1 as $key=>$card): ?><div class="cell6" style="width:50%; text-align:center; margin-top:10px; padding:10px;">
        <a href="<?php echo U('/wap/card/info', array('id' => $card['id']));?>"><img src="/Public/Img/<?php echo ($card["pic"]); ?>" style="height:100px;"/></a>
        <div style="text-align:left;">
          <div><a href="<?php echo U('/wap/card/info', array('id' => $card['id']));?>"><h4><?php echo ($card["card_name"]); ?></h4></a></div>
          <div class="text-red" style="text-align:left;">
            <span class="text-gray">抢购价:</span> ¥<?php echo ($card["price"]); ?>
            <button type="button" class="pull-right buy_card btn danger outline rounded" data-id="<?php echo ($card["id"]); ?>">马上抢</button>
          </div>
        </div>
      </div><?php endforeach; endif; ?>
    </div>
  </div>
</div>
<div class="section box">
  <div style="overflow:hidden;">
    <div>
      <i class="icon icon-bell-alt text-red"></i>
      <div class="inline text-gray">距本次开奖还有：</div>
      <div class="inline fnTimeCountDown text-red" data-end="<?php echo ($end_time); ?>">
        <span class="mini">00</span>分
        <span class="sec">00</span>秒
        <span class="hm">000</span>
      </div>
    </div>
    <hr/>
    <div class="row">
      <?php if(is_array($card_list_2)): foreach($card_list_2 as $key=>$card): ?><div class="cell6" style="width:50%; text-align:center; margin-top:10px; padding:10px;">
        <a href="<?php echo U('/wap/card/info', array('id' => $card['id']));?>"><img src="/Public/Img/<?php echo ($card["pic"]); ?>" style="height:100px;"/></a>
        <div style="text-align:left;">
          <div><a href="<?php echo U('/wap/card/info', array('id' => $card['id']));?>"><h4><?php echo ($card["card_name"]); ?></h4></a></div>
          <div class="text-red" style="text-align:left;">
            <span class="text-gray">抢购价:</span> ¥<?php echo ($card["price"]); ?>
            <button type="button" class="pull-right buy_card btn danger outline rounded" data-id="<?php echo ($card["id"]); ?>">马上抢</button>
          </div>
        </div>
      </div><?php endforeach; endif; ?>
    </div>
  </div>
</div>
<div class="section box">
  <div style="overflow:hidden;">
    <div>
      <i class="icon icon-bell-alt text-red"></i>
      <div class="inline text-gray">距本次开奖还有：</div>
      <div class="inline fnTimeCountDown text-red" data-end="<?php echo ($end_time); ?>">
        <span class="mini">00</span>分
        <span class="sec">00</span>秒
        <span class="hm">000</span>
      </div>
    </div>
    <hr/>
    <div class="row">
      <?php if(is_array($card_list_3)): foreach($card_list_3 as $key=>$card): ?><div class="cell6" style="width:50%; text-align:center; margin-top:10px; padding:10px;">
        <a href="<?php echo U('/wap/card/info', array('id' => $card['id']));?>"><img src="/Public/Img/<?php echo ($card["pic"]); ?>" style="height:100px;"/></a>
        <div style="text-align:left;">
          <div><a href="<?php echo U('/wap/card/info', array('id' => $card['id']));?>"><h4><?php echo ($card["card_name"]); ?></h4></a></div>
          <div class="text-red" style="text-align:left;">
            <span class="text-gray">抢购价:</span> ¥<?php echo ($card["price"]); ?>
            <button type="button" class="pull-right buy_card btn danger outline rounded" data-id="<?php echo ($card["id"]); ?>">马上抢</button>
          </div>
        </div>
      </div><?php endforeach; endif; ?>
    </div>
  </div>
</div>
<div class="section box">
  <div style="overflow:hidden;">
    <div>
      <i class="icon icon-bell-alt text-red"></i>
      <div class="inline text-gray">距本次开奖还有：</div>
      <div class="inline fnTimeCountDown text-red" data-end="<?php echo ($end_time); ?>">
        <span class="mini">00</span>分
        <span class="sec">00</span>秒
        <span class="hm">000</span>
      </div>
    </div>
    <hr/>
    <div class="row">
      <?php if(is_array($card_list_4)): foreach($card_list_4 as $key=>$card): ?><div class="cell6" style="width:50%; text-align:center; margin-top:10px; padding:10px;">
        <a href="<?php echo U('/wap/card/info', array('id' => $card['id']));?>"><img src="/Public/Img/<?php echo ($card["pic"]); ?>" style="height:100px;"/></a>
        <div style="text-align:left;">
          <div><a href="<?php echo U('/wap/card/info', array('id' => $card['id']));?>"><h4><?php echo ($card["card_name"]); ?></h4></a></div>
          <div class="text-red" style="text-align:left;">
            <span class="text-gray">抢购价:</span> ¥<?php echo ($card["price"]); ?>
            <button type="button" class="pull-right buy_card btn danger outline rounded" data-id="<?php echo ($card["id"]); ?>">马上抢</button>
          </div>
        </div>
      </div><?php endforeach; endif; ?>
    </div>
  </div>
</div>
<div class="box">
</div>
<script type="text/javascript">
$(function(){
  $.ajax({
    url: '/wap/user/check_mobile',
    type: 'post',
    dataType: 'json',
    success: function(res) {
      if (res.status == -1) {
        $.Display.dismiss()
          var bind_box = new $.Display({
            backdrop: true,
            placement: 'center',
            remote: '/wap/public/bind_mobile',
            display: 'modal',
            backdropDismiss: false
          }); 
        bind_box.show();
      }
    }
  });
  $('.buy_card').on('click', function(){
    var card_id = $(this).data('id');
    $.ajax({
      url: '/wap/public/check_buy_time',
      type: 'post',
      dataType: 'json',
      success: function(res) {
        if (res.status == -1) {
          alert('开奖前1分钟不能下单');
          return false;
        } else if (res.status == -2) { 
          alert('2点～9点不开奖');
          return false;
        } else {
          var buy_box = new $.Display({
            backdrop: true,
            placement: 'bottom',
            remote: '/wap/card/buy_info?id=' + card_id,
            display: 'modal',
          }); 
          buy_box.show();
        } 
      }
    });
  });
})
$(".fnTimeCountDown").fnTimeCountDown("<?php echo ($start_time); ?>");
</script>


    
<nav class="nav nav-auto affix dock-bottom justified">
  <a class="flex-column <?php if($action == 'home'): ?>warning<?php endif; ?>" href="<?php echo U('/index');?>">
    <i class="icon icon-home"></i>
    首页
  </a>
  <a class="flex-column <?php if($action == 'top'): ?>warning<?php endif; ?>" href="<?php echo U('/wap/top/index');?>">
    <i class="icon icon-th-list"></i>
    排行
  </a>
  <a class="flex-column <?php if($action == 'chart'): ?>warning<?php endif; ?>" href="<?php echo U('/wap/chart/index');?>">
    <i class="icon icon-star"></i>
    记录
  </a>
  <a class="flex-column <?php if($action == 'user'): ?>warning<?php endif; ?>" href="<?php echo U('/wap/user/index');?>">
    <i class="icon icon-smile"></i>
    我的
  </a>
</nav>


    <!-- /主体 -->
    <!-- 底部 -->
    
<footer>
</footer>


    <!-- /底部 -->
    
  </body>
</html>